var Shell={
	exec:function(cmd){
		var WshShell= new ActiveXObject("WScript.Shell");
		return WshShell.exec(cmd);
	},
	run:function(cmd){
		var WshShell= new ActiveXObject("WScript.Shell");
		//alert(cmd);
		return WshShell.Run(cmd,0,true);
	}
}
function alert(x)
{
	WScript.Echo(x);
}
function process()
{
	var outFile=WScript.Arguments(0);
	var errFile=WScript.Arguments(1);
	var cmd=unescape(WScript.Arguments(2));
	var fullCmd=cmd+' 1>"'+outFile+'" 2>"'+errFile+'"';
	return Shell.run(fullCmd);
	
}
WScript.Quit(process());